import { Inject, Controller, Query, Post, Body } from '@midwayjs/core';
import { Context } from '@midwayjs/koa';
import { SignService } from '../service/sign.service';
@Controller('/sign')
export class APIController {
  @Inject()
  ctx: Context;

  @Inject()
  signService: SignService;

  @Post('/get_sign')
  async getSign(@Body() data, @Query() query) {
    const sign = await this.signService.getSign({
      method: query.method,
      type: query.type,
      data,
    });

    return { success: true, message: 'OK', data: sign };
  }
}
